package 接口;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: GaoBo
 * Date: 2021-05-18
 * Time: 20:32
 */
interface IShape {
    void draw();
   /*
     int a = 10;
    int b = 20;
    int c = 30;
    default void func() {
        System.out.println("fadsa");
    }

    default void func2() {
        System.out.println("fadsa");
    }*/

    /*default void func() {
        System.out.println("fadsa");
    }*/

}
class Cycle implements IShape{
    @Override
    public void draw() {
        System.out.println("●");
    }
}
class Rect implements IShape {
    @Override
    public void draw() {
        System.out.println("♦");
    }
}

public class Test {
    public static void drawMap(IShape iShape) {
        iShape.draw();
        //iShape.func();
    }

    public static void main(String[] args) {
        //IShape iShape = new IShape();
        Rect rect = new Rect();
        Cycle cycle = new Cycle();
        drawMap(rect);
        drawMap(cycle);
    }
}
